package edu.nf.ch03;

import edu.nf.ch03.entity.User;
import edu.nf.ch03.service.UserService;

import java.util.List;
import java.util.Map;

/**
 * @author CSY
 * @date 2025 - 04 - 23
 */
public class Main {
    public static void main(String[] args) {
        UserService service = new UserService();
        /*User user = service.getUserById(1);
        System.out.println(user.getName());*/
//        Map<String, Object> user = service.getUserByName("userA");
        /*System.out.println(user.get("name"));
        user.forEach((k, v) -> {
            System.out.println(k+":"+v);
        });*/

        List<Map<String,Object>> maps = service.listUserMap();

        for (Map<String, Object> map : maps) {
            map.forEach((k, v) -> {
                System.out.println(k+":"+v);
            });
        }
    }
}
